home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_gen_aiturncoat.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  62 lines

  1. # Jones 3D Cog Script
  2. #
  3. # 00_AITurnCoat.cog
  4. #
  5. # "turncoat" attacks something besides Kyle
  6. # Triggered by entered, activate, or user0
  7. #
  8. # [RD]
  9. #
  10. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  11. # ========================================================================================
  12.  
  13. symbols
  14.     message    activate
  15.     message    entered
  16.     message    killed
  17.     message    user0
  18.  
  19.     thing        turncoat    mask=-1
  20.     thing        victim    mask=-1
  21.  
  22.     sector    fight    
  23.  
  24.     int        locked=0    local
  25. end
  26.  
  27. # ========================================================================================
  28.  
  29. code
  30.  
  31. activate:
  32.     call entered;
  33.     return;
  34.  
  35. # ........................................................................................
  36.  
  37. user0:
  38.     call entered;
  39.     return;
  40.  
  41. # ........................................................................................
  42.  
  43. entered:
  44.     if (locked) return;
  45.  
  46.     locked = 1;
  47.     AISetFireTarget(turncoat, victim);
  48.     AISetMoveThing(turncoat, victim);
  49.     AISetLookPos(turncoat, GetThingPos(victim));
  50.     AISetMode(turncoat, 0x202);
  51.     AIClearMode(turncoat, 0x1004);
  52.     return;
  53.  
  54. # ........................................................................................
  55.  
  56. killed:
  57.     locked = 1;
  58.     return;
  59.  
  60. end
  61.  
  62.